<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户协议 - 龙虎斗</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            background-attachment: fixed;
            min-height: 100vh;
            color: #333;
            transition: background 0.3s ease;
        }

        /* 主题颜色样式 */
        body.theme-blue {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-green {
            background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-orange {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-purple {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-pink {
            background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-red {
            background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-yellow {
            background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-cyan {
            background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-lime {
            background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-indigo {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-teal {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-rose {
            background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-amber {
            background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-emerald {
            background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-sky {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
            background-attachment: fixed !important;
        }

        body.theme-violet {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            background-attachment: fixed !important;
        }

        .container {
            max-width: 480px;
            margin: 0 auto;
            background: transparent;
            min-height: 100vh;
            position: relative;
        }

        .header {
            background: rgba(102, 126, 234, 0.9);
            backdrop-filter: blur(10px);
            color: white;
            padding: 20px;
            text-align: center;
            position: relative;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .back-btn {
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.2);
            border: none;
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(10px);
        }

        .header h1 {
            font-size: 20px;
            font-weight: 600;
            margin: 0;
        }

        .agreement-content {
            padding: 20px;
        }

        .agreement-section {
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 18px;
            padding: 25px;
            margin-bottom: 20px;
            border: 1px solid rgba(233, 236, 239, 0.8);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .agreement-title {
            color: #495057;
            font-size: 18px;
            margin-bottom: 20px;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 12px;
            padding-bottom: 12px;
            border-bottom: 2px solid #e9ecef;
        }

        .agreement-text {
            color: #495057;
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 15px;
        }

        .agreement-text:last-child {
            margin-bottom: 0;
        }

        .agreement-list {
            list-style: none;
            padding-left: 0;
        }

        .agreement-list li {
            color: #495057;
            font-size: 14px;
            line-height: 1.6;
            margin-bottom: 10px;
            padding-left: 20px;
            position: relative;
        }

        .agreement-list li::before {
            content: '•';
            color: #667eea;
            font-weight: bold;
            position: absolute;
            left: 0;
        }

        .agreement-list li:last-child {
            margin-bottom: 0;
        }

        .agreement-list ol {
            padding-left: 20px;
            margin: 10px 0;
        }

        .agreement-list ol li {
            padding-left: 0;
            margin-bottom: 8px;
        }

        .agreement-list ol li::before {
            content: none;
        }

        .agreement-list ol li::marker {
            color: #667eea;
            font-weight: bold;
        }

        .highlight {
            background: rgba(102, 126, 234, 0.1);
            padding: 15px;
            border-radius: 10px;
            border-left: 4px solid #667eea;
            margin: 15px 0;
        }

        .highlight-title {
            color: #667eea;
            font-weight: 600;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .highlight-text {
            color: #495057;
            font-size: 13px;
            line-height: 1.5;
        }

        .warning {
            background: rgba(255, 193, 7, 0.1);
            padding: 15px;
            border-radius: 10px;
            border-left: 4px solid #ffc107;
            margin: 15px 0;
        }

        .warning-title {
            color: #856404;
            font-weight: 600;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .warning-text {
            color: #495057;
            font-size: 13px;
            line-height: 1.5;
        }

        .contact-info {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 15px;
            text-align: center;
            margin-top: 20px;
        }

        .contact-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 10px;
        }

        .contact-details {
            font-size: 14px;
            opacity: 0.9;
            line-height: 1.5;
        }

        .last-updated {
            text-align: center;
            color: #6c757d;
            font-size: 12px;
            margin-top: 20px;
            padding: 15px;
            background: rgba(255, 255, 255, 0.7);
            border-radius: 10px;
        }

        /* 响应式设计 */
        @media (max-width: 480px) {
            .agreement-section {
                padding: 20px;
                margin-bottom: 15px;
            }

            .agreement-title {
                font-size: 16px;
                margin-bottom: 15px;
            }

            .agreement-text {
                font-size: 13px;
            }

            .agreement-list li {
                font-size: 13px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <button class="back-btn" onclick="goBack()">←</button>
            <h1>用户协议</h1>
        </div>

        <div class="agreement-content">
            <!-- 协议概述 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>📋</span>
                    协议概述
                </h3>
                <p class="agreement-text">
                    欢迎使用龙虎斗游戏！本用户协议（以下简称"协议"）是您与我们之间就使用龙虎斗游戏服务所订立的协议。
                </p>
                <p class="agreement-text">
                    请您仔细阅读本协议的全部内容。如果您对本协议的任何条款表示异议，您可以选择不使用我们的服务。使用我们的服务即表示您完全接受本协议的所有条款。
                </p>
            </div>

            <!-- 服务说明 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>🎮</span>
                    服务说明
                </h3>
                <p class="agreement-text">
                    龙虎斗是一款休闲卡牌游戏，我们为您提供以下服务：
                </p>
                <ul class="agreement-list">
                    <li>游戏娱乐服务</li>
                    <li>用户账户管理</li>
                    <li>游戏数据统计</li>
                    <li>客户支持服务</li>
                    <li>社区互动功能</li>
                </ul>
            </div>

            <!-- 用户权利 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>⚖️</span>
                    用户权利
                </h3>
                <p class="agreement-text">作为我们的用户，您享有以下权利：</p>
                <ul class="agreement-list">
                    <li>免费使用基本游戏功能</li>
                    <li>创建和管理个人账户</li>
                    <li>享受客户支持服务</li>
                    <li>参与游戏社区活动</li>
                    <li>对服务提出建议和反馈</li>
                </ul>
            </div>

            <!-- 用户义务 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>📝</span>
                    用户义务
                </h3>
                <p class="agreement-text">在使用我们的服务时，您需要遵守以下规定：</p>
                <ul class="agreement-list">
                    <li>遵守国家法律法规</li>
                    <li>不得从事违法违规活动</li>
                    <li>不得恶意破坏游戏环境</li>
                    <li>不得侵犯其他用户权益</li>
                    <li>不得传播有害信息</li>
                    <li>保护个人账户安全</li>
                </ul>
                
                <div class="warning">
                    <div class="warning-title">重要提醒</div>
                    <div class="warning-text">
                        违反用户义务可能导致账户被限制或封禁，情节严重的可能承担法律责任。
                    </div>
                </div>
            </div>

            <!-- 游戏规则 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>🎯</span>
                    游戏规则
                </h3>
                <p class="agreement-text">
                    为了维护良好的游戏环境，所有用户必须遵守以下游戏规则：
                </p>
                <ol class="agreement-list">
                    <li><strong>公平游戏：</strong>不得使用外挂、脚本等作弊工具</li>
                    <li><strong>文明交流：</strong>不得发布辱骂、威胁等不当言论</li>
                    <li><strong>尊重他人：</strong>不得骚扰、歧视其他用户</li>
                    <li><strong>保护隐私：</strong>不得泄露他人个人信息</li>
                    <li><strong>遵守秩序：</strong>不得恶意刷屏、刷分等</li>
                </ol>
            </div>

            <!-- 账户管理 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>👤</span>
                    账户管理
                </h3>
                <p class="agreement-text">
                    关于账户管理的相关规定：
                </p>
                <ul class="agreement-list">
                    <li>您需要提供真实、准确的注册信息</li>
                    <li>您有责任保护账户密码和登录安全</li>
                    <li>不得将账户转让、出租或出售给他人</li>
                    <li>我们有权对违规账户采取限制措施</li>
                    <li>账户长期未使用可能被清理</li>
                </ul>
            </div>

            <!-- 知识产权 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>🔐</span>
                    知识产权
                </h3>
                <p class="agreement-text">
                    龙虎斗游戏及其相关内容的知识产权归属：
                </p>
                <ul class="agreement-list">
                    <li>游戏软件、界面设计、音效等归我们所有</li>
                    <li>用户创作的内容归用户所有</li>
                    <li>不得复制、传播、修改我们的知识产权内容</li>
                    <li>不得将游戏内容用于商业用途</li>
                </ul>
            </div>

            <!-- 免责声明 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>⚠️</span>
                    免责声明
                </h3>
                <p class="agreement-text">
                    我们将在合理范围内提供服务，但请注意以下免责条款：
                </p>
                <ul class="agreement-list">
                    <li>我们不对因网络故障、系统维护等造成的服务中断承担责任</li>
                    <li>我们不对用户因使用服务而产生的任何损失承担责任</li>
                    <li>我们不对第三方提供的服务承担责任</li>
                    <li>我们保留随时修改或终止服务的权利</li>
                </ul>
                
                <div class="highlight">
                    <div class="highlight-title">服务承诺</div>
                    <div class="highlight-text">
                        尽管有上述免责条款，我们仍将尽最大努力为您提供稳定、优质的游戏服务。
                    </div>
                </div>
            </div>

            <!-- 协议修改 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>🔄</span>
                    协议修改
                </h3>
                <p class="agreement-text">
                    我们可能会根据业务发展需要修改本协议：
                </p>
                <ul class="agreement-list">
                    <li>协议修改将通过应用内通知、邮件等方式告知</li>
                    <li>重大修改将提前30天通知用户</li>
                    <li>继续使用服务即表示接受修改后的协议</li>
                    <li>如不同意修改，可以停止使用服务</li>
                </ul>
            </div>

            <!-- 争议解决 -->
            <div class="agreement-section">
                <h3 class="agreement-title">
                    <span>🤝</span>
                    争议解决
                </h3>
                <p class="agreement-text">
                    如发生争议，我们将通过以下方式解决：
                </p>
 <ul class="agreement-list">
                    <li>优先通过友好协商解决</li>
                    <li>协商不成的，可通过客服渠道投诉</li>
                    <li>必要时可通过法律途径解决</li>
                    <li>争议解决期间，服务可能受到影响</li>
                </ul>
            </div>

            <!-- 联系我们 -->
            <div class="contact-info">
                <div class="contact-title">联系我们</div>
                <div class="contact-details">
                    如果您对本用户协议有任何疑问、意见或建议，请通过以下方式与我们联系：<br>
                    邮箱：agreement@longhudou.com<br>
                    客服热线：400-123-4567<br>
                    在线客服：工作日 9:00-18:00
                </div>
            </div>

            <!-- 最后更新时间 -->
            <div class="last-updated">
                最后更新时间：2024年12月
            </div>
        </div>
    </div>

    <script>
        // 返回上一页
        function goBack() {
            window.history.back();
        }

        // 应用主题颜色
        function applyTheme(theme) {
            console.log('用户协议页面应用主题:', theme);
            
            // 移除所有主题类
            const body = document.body;
            const allThemes = ['theme-blue', 'theme-green', 'theme-orange', 'theme-purple', 
                              'theme-pink', 'theme-red', 'theme-yellow', 'theme-cyan', 
                              'theme-lime', 'theme-indigo', 'theme-teal', 'theme-rose', 
                              'theme-amber', 'theme-emerald', 'theme-sky', 'theme-violet'];
            
            allThemes.forEach(themeClass => {
                body.classList.remove(themeClass);
            });
            
            // 添加新主题类
            if (theme && theme !== 'default') {
                body.classList.add('theme-' + theme);
                console.log('已应用主题类:', 'theme-' + theme);
            }
        }

        // 检查并同步主题
        function checkAndSyncTheme() {
            const savedTheme = localStorage.getItem('selectedTheme');
            const lastUpdateTime = localStorage.getItem('themeUpdateTime');
            
            if (savedTheme && lastUpdateTime) {
                console.log('检测到保存的主题:', savedTheme);
                applyTheme(savedTheme);
            }
        }

        // 监听主题变化
        function startThemeListener() {
            let lastThemeUpdateTime = localStorage.getItem('themeUpdateTime') || '0';
            
            // 定期检查主题更新
            setInterval(() => {
                const currentThemeUpdateTime = localStorage.getItem('themeUpdateTime') || '0';
                
                if (currentThemeUpdateTime !== lastThemeUpdateTime) {
                    console.log('检测到主题更新');
                    lastThemeUpdateTime = currentThemeUpdateTime;
                    
                    const savedTheme = localStorage.getItem('selectedTheme');
                    if (savedTheme) {
                        console.log('同步新主题:', savedTheme);
                        applyTheme(savedTheme);
                    }
                }
            }, 500);
        }

        // 页面加载时初始化
        document.addEventListener('DOMContentLoaded', function() {
            console.log('用户协议页面加载完成');
            
            // 检查并同步主题
            checkAndSyncTheme();
            
            // 启动主题监听器
            startThemeListener();
            
            // 监听页面可见性变化
            document.addEventListener('visibilitychange', function() {
                if (!document.hidden) {
                    console.log('页面变为可见，检查主题更新');
                    checkAndSyncTheme();
                }
            });
            
            console.log('主题同步功能已启动');
            console.log('当前保存的主题:', localStorage.getItem('selectedTheme'));
            console.log('主题更新时间:', localStorage.getItem('themeUpdateTime'));
        });
    </script>
</body>
</html>
